package com.example.supplychainbackend.dao.design;

import com.example.supplychainbackend.entity.design.BOMEntity;
import com.example.supplychainbackend.entity.sales.ContractEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;
import java.util.Optional;

public interface BOMDao extends JpaRepository<BOMEntity, String> {
    Optional<BOMEntity> findByBomLineNumber(String bomLineNumber);
    BOMEntity findByMaterialCode(String materialCode);
    Long deleteByBomLineNumber(String bomLineNumber);
    Long deleteByMaterialCode(String materialCode);

    List<BOMEntity> findAllByOrderId(String orderId);

}